package com.adee.algorithm.test.test20230418;

public class BSTTree {

    BSTNode root;

    public Object get(int key) {
        return null;
    }

    public Object min() {
        return null;
    }

    public Object max() {
        return null;
    }

    public void put(int key, Object value) {

    }

    // 前驱
    public Object predecessor(int key) {
        return null;
    }

    // 后继
    public Object postdecessor(int key) {
        return null;
    }

    public Object delete(int key) {
        return null;
    }

    static class BSTNode {
        int key;
        Object value;
        BSTNode left;
        BSTNode right;
        public BSTNode(int key) {
            this.key = key;
        }
        public BSTNode(int key, Object value) {
            this.key = key;
            this.value = value;
        }
        public BSTNode(int key, Object value, BSTNode left, BSTNode right) {
            this.key = key;
            this.value = value;
            this.left = left;
            this.right = right;
        }
    }
}
